package com.demo.project_template.exception;

import lombok.Getter;

/**
 * @Author ZhangKeChen  🤙🤙🏼🤙🏽
 * @Date 2022/11/28
 * @Description 异常枚举
 */
@Getter
public enum ErrorCodeExceptionEnum {
    SYSTEM_ERROR(500001, "系统异常"),

    SIGNATURE_ERROR(500002, "令牌异常"),

    TOKEN_TIME_OUT(500003, "会话已过期"),

    PARAM_ERROR(500004, "参数异常"),

    CODE_ERROR(500005, "验证码错误"),

    CONFIG_IS_NULL(500006, "配置信息为空"),

    PAY_TYPE_ERROR(500007, "支付类型错误"),

    PAY_ERROR(500008, "支付错误"),

    USER_ERROR(500009, "用户名或密码错误"),

    CODE_OUT(500010, "验证码无效"),

    USER_LOGIN_ERROR(500011, "Token异常，重新登录"),

    USER_LOGIN_NUll(500012, "用户令牌错误，重新登录"),

    USER_OTHER_LOGIN_ERROR(500013, "账号在异地登录，请重新登录。"),

    USER_SHOPPING_CART_ERROR(50014, "请勾选商品后下单"),

    ALGORITHM_PARAM_ERROR(500015, "算法传递参数异常"),

    REQUEST_METHOD_ERROR(500016, "请求方式错误"),

    ALIPAY_TYPE_ERROR(500017,"输入的支付类型不在许可支付类型范围内。许可类型：当面付（FACE），电脑网站支付（H5），手机网站支付（WAP），APP支付（APP）"),

    ALIPAY_ERROR(500018,"支付宝支付异常"),

    ALIPAY_QUERY_PARAM_ERROR(500019,"tradeNo 和 outTradeNo 不能同时为空！"),

    ALIPAY_QUERY_ERROR(500020,"查询支付宝支付订单异常"),

    ALIPAY_REFUND_ERROR(500021,"支付宝退款异常"),

    ALIPAY_QUERY_REFUND_ERROR(500022,"查询支付宝退款异常"),

    ALIPAY_DOWNLOAD_ORDER_ERROR(500023,"支付宝下载对账单异常"),

    ABNORMAL_OPERATION(500024, "操作失败"),

    BACKSTAGE_USER_IS_NULL(500025, "用户不存在"),

    BACKSTAGE_USER_ACCOUNT_ERROR(500026, "用户名或密码错误"),

    ALIPAY_PRODUCT_ERROR(500027,"商品名称、商户订单号、商品价格不能为空！"),

    ALIPAY_RETURN_URL_NULL(500028,"电脑网站支付的跳转地址（returnUrl）不能为空！"),

    ALIPAY_RETURN_AND_QUIT_URL_NULL(500029,"手机网站支付的失败退出地址（quitUrl）、成功跳转地址（returnUrl）不能为空！"),

    COUPON_IS_NULL(500030, "优惠券异常"),

    USER_COUPON_IS_RECEIVE(500031, "您已经领取过了"),

    USER_IS_NOT_NEW(500032, "您不符合领取条件"),

    SYSTEM_BUSY(500033, "系统繁忙，稍后再试"),
    ;


    /**
     * 异常码
     */
    final Integer code;
    /**
     * 异常信息
     */
    final String msg;

    ErrorCodeExceptionEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }


}
